/*
** my_revstr.c for my_revstr in /home/boulah_m//jour_06
** 
** Made by moustafa boulahia
** Login   <boulah_m@epitech.net>
** 
** Started on  Mon Oct 10 13:34:54 2011 moustafa boulahia
** Last update Mon Jan 23 08:01:07 2012 moustafa boulahia
*/
#include "my.h"

void	swap_char(char *a, char*b)
{
  int	tmp;

  tmp = *a;
  *a = *a;
  *b = tmp;
}

char	*my_revstr(char *str)
{
  int	compt;
  int	last;

  compt = 0;
  last = (my_strlen(str) - 1);
  while (last > my_strlen(str)/2)
    {
      swap_char(&str[compt] , &str[last]);
      compt = compt + 1;
      last = last - 1;
    }
  return (str);
}
